/*
 * mainScreen.h
 *
 *  Created on: Nov 9, 2011
 *      Author: administratorforpc
 */

#ifndef MAINSCREEN_H_
#define MAINSCREEN_H_


#include <ma.h>

#include <MAUI/Screen.h>
#include <MAUI/Engine.h>
#include <MAUI/Font.h>
#include <MAUI/Label.h>
#include <MAUI/ListBox.h>
#include <MAUI/Image.h>
#include <MAUI/Layout.h>
#include <MAUI/EditBox.h>
#include <MAUtil/Moblet.h>
#include "User.h"

using namespace MAUI;
using namespace MAUtil;

Widget* createSoftKeyBar(int height, char *left, char *right);

class MainScreen : public Screen {
public:
	MainScreen();
	~MainScreen();
	void keyPressEvent(int keyCode, int nativeCode);
	void pointerPressEvent(MAPoint2d point);
	void pointerReleaseEvent(MAPoint2d point);
private:
	Vector<Screen*> screens;
	ListBox* listBox;
	Layout* layout;
	Widget *softKeys;
	Image *bg;
	Label* mBackgroundArea;
	User *myUser;
};

class MyMoblet : public Moblet  {
public:
	MyMoblet();
	void keyPressEvent(int keyCode, int nativeCode);
	void keyReleaseEvent(int keyCode, int nativeCode);

	void closeEvent();

private:
	Screen *mainScreen;
};


#endif /* MAINSCREEN_H_ */
